import javax.swing.*;
/**
 * Write a description of class StepView here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class StepView extends JLabel
{
	// instance variables - replace the example below with your own
	private final String STEP_PREFIX = "Step: ";
    private SimulatorModel model;

	/**
	 * Constructor for objects of class StepView
	 */
	public StepView(SimulatorModel model)
	{
	    super();
	    setHorizontalAlignment(CENTER);
	    this.model=model;
	}

	/**
	 * An example of a method - replace this comment with your own
	 * 
	 * @param  y   a sample parameter for a method
	 * @return     the sum of x and y 
	 */
	public void update()
	{
		setText(STEP_PREFIX+model.getStep());
	}
}
